/-app ...
/-app/tests
Application.ts
/-boot
/-imports
/-storage
/-tests
/-typings
stringUtils.ts
teapo.html
1
module teapo.app {
2
 
3
  export class Application {
4
 
5
    tests: tests.TestPage = null;
6
    
7
    constructor(private _host: HTMLElement) {
8
    
9
      this._startBoot();
10
    }
11
 
12
    private _startBoot() {
13
      if (earlyElement) {
14
        earlyElement.textContent = 'Loading test list...';
15
      }
16
 
17
      setTimeout(() => {
18
        this.tests = new tests.TestPage();
19
 
20
        setTimeout(() => {
21
          if (earlyElement) {
22
            earlyElement.textContent = 'Rendering...';
23
          }
24
                   
25
          this._completeBoot();
26
        }, 10);
27
      }, 10);
28
    }
29
 
30
    private _completeBoot() {
31
      if (earlyElement && earlyElement.parentElement) {
32
        earlyElement.parentElement.removeChild(earlyElement);
33
      }
34
      
35
      ko.renderTemplate('Application', this, null, this._host);
36
      
37
    }
38
 
39
  }
40
 
41
}